﻿using System.ComponentModel;

namespace Validator
{
    public enum Pattern
    {
        [Description(@"^(?("")("".+?""@)|(([0-9a-zA-Z]((\.(?!\.))|[-!#\$%&'\*\+/=\?\^`\{\}\|~\w])*)(?<=[0-9a-zA-Z])@))(?(\[)(\[(\d{1,3}\.){3}\d{1,3}\])|(([0-9a-zA-Z][-\w]*[0-9a-zA-Z]\.)+[a-zA-Z]{2,6}))$")]
        Email,

        [Description(@"^[a-zA-Z''-'\s]{1,40}$")]
        IndividualName,

        [Description(@"^[a-zA-Z''-'-&\s]{1,40}$")]
        OrganisationName,

        [Description(@"^(ht|f)tp(s?)\:\/\/[0-9a-zA-Z]([-.\w]*[0-9a-zA-Z])*(:(0-9)*)*(\/?)([a-zA-Z0-9\-\.\?\,\'\/\\\+&amp;%\$#_]*)?$")]
        URL,

        [Description(@"^\d\d\d\d$")]
        Postcode,

        [Description(@"^\d+$")]
        PositiveNumber,

        [Description(@"^(-)?\d+(\.\d\d)?$")]
        Currency,

        [Description("")]
        Custom
    }
}
